package gunfire.potions;

import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.helpers.PowerTip;
import com.megacrit.cardcrawl.localization.PotionStrings;
import com.megacrit.cardcrawl.potions.AbstractPotion;
import gunfire.GunfireMod;
import gunfire.actions.MyDiscoveryAction;

public class OrbPotion extends AbstractPotion {
    public static final String POTION_ID = GunfireMod.makeID("OrbPotion");
    private static final PotionStrings potionStrings = CardCrawlGame.languagePack.getPotionString(POTION_ID);
    public static final String NAME = potionStrings.NAME;
    public static final String[] DESCRIPTIONS = potionStrings.DESCRIPTIONS;

    public OrbPotion() {
        super(potionStrings.NAME, POTION_ID, PotionRarity.COMMON, PotionSize.CARD, PotionColor.FIRE);
        this.isThrown = false;
    }

    public int getPotency(int ascensionLevel) {
        return 1;
    }

    public void initializeData() {
        this.potency = this.getPotency();
        if (AbstractDungeon.player != null && AbstractDungeon.player.hasRelic("SacredBark")) {
            this.description = potionStrings.DESCRIPTIONS[1];
        } else {
            this.description = potionStrings.DESCRIPTIONS[0];
        }

        this.tips.clear();
        this.tips.add(new PowerTip(this.name, this.description));
    }

    public void use(AbstractCreature target) {
        this.addToBot(new MyDiscoveryAction(GunfireMod.ENERGY_ORB_CARD, this.potency));
    }

    public AbstractPotion makeCopy() {
        return new OrbPotion();
    }

}
